package com.link.base.base.autoconfig.autoconfig.controller;

import com.link.base.base.autoconfig.autoconfig.model.LnkInnerWhere;
import com.link.base.base.autoconfig.autoconfig.service.LnkInnerWhereService;
import com.link.core.basic.controller.BasicController;
import com.link.core.basic.service.BasicService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@Controller("LnkInnerWhereController")
@RequestMapping("/link/LnkInnerWhere")
public class LnkInnerWhereController extends BasicController<LnkInnerWhere> {
    @Resource
    private LnkInnerWhereService service;

    @Override
    public BasicService<LnkInnerWhere> getBasicService() throws Exception {
        return service;
    }

    @Override
    public void beforQueryAllOrExample(LnkInnerWhere entity, HttpServletRequest request) throws Exception {
        super.beforQueryAllOrExample(entity, request);
        if (null == entity.getParentid()) {
            entity.setParentid(0L);
        }
    }
}
